package com.sharker.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.sharker.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class BannerWebviewActivity extends AppCompatActivity {

    @BindView(R.id.bannerWebiew)
    WebView bannerWebiew;
    private String click;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_webview);
        ButterKnife.bind(this);
        click = getIntent().getStringExtra("click");
        init();

    }
    private void init(){
        bannerWebiew.loadUrl(click);
        bannerWebiew.setWebViewClient(new WebViewClient(){
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String request) {
                view.loadUrl(request);
                return true;
            }
        });
    }
}
